﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="日进度数据锁定.aspx.cs" Inherits="syc.Produce.日进度数据锁定" %>
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript" language="javascript" src="/common.js"></script>
<form id="form1" runat="server">
<div id="wintop" class="wintop">日进度数据锁定</div>

<asp:Panel ID="Panel1" runat="server" CssClass="panel" GroupingText="锁定与解锁操作">
<span style="display:inline-block;width:200px;">分厂：<asp:DropDownList ID="FenChang" runat="server" Width="115px">
        <asp:ListItem Value="0">全部</asp:ListItem>
        <asp:ListItem Value="1">一分厂</asp:ListItem>
        <asp:ListItem Value="2">二分厂</asp:ListItem>
        <asp:ListItem Value="3">三分厂</asp:ListItem>
        <asp:ListItem Value="4">四分厂</asp:ListItem>
        <asp:ListItem Value="5">五分厂</asp:ListItem>
    </asp:DropDownList></span>
<span style="display:inline-block;width:200px;">日期：<asp:TextBox ID="Date1" runat="server" CssClass="intxt1" Width="115px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date1').value, document.getElementById('Date1'));" /></span>
<asp:Button ID="Button_Lock" runat="server" Text="锁定" CssClass="mbutton" 
        onclick="Button_Lock_Click" />
<asp:Button ID="Button_Unlock" runat="server" Text="解锁" CssClass="mbutton" 
        onclick="Button_Unlock_Click" />
</asp:Panel>

<asp:Panel ID="Panel_Msg" runat="server" CssClass="panel2">
    <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
</asp:Panel>

<style>td.grid{cursor:default;}</style>


    
    <div class="gridframe">
        <div class="gridview">
        
            <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#e5cfab">
	            <tr>
		            <td class="grid-title">分厂生产日进度数据锁定情况</td>
		        </tr>
		        <tr>
		            <td class="grid-back">
                        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
                            SelectCommand=
"select distinct 锁定,分厂ID,日期 from 生产进度
union select distinct 锁定,3 as 分厂ID,日期 from 生产进度3
union select distinct 锁定,4 as 分厂ID,日期 from 生产进度4
order by 日期 desc,分厂ID asc
"
                            onselected="SqlDataSource1_Selected" ></asp:SqlDataSource>
                        <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                            AutoGenerateColumns="False" CssClass="grid"
                            DataSourceID="SqlDataSource1"  PageSize="15"
                            GridLines="None" ondatabound="GridView1_DataBound" 
                            onpageindexchanged="GridView1_PageIndexChanged" AllowSorting="True" 
                            UseAccessibleHeader="False" >
                            <PagerSettings Visible="False" />
                            <RowStyle CssClass="grid-row-normal" />
                            <Columns>
                            
                                <asp:TemplateField HeaderText="锁定"  ItemStyle-BackColor="#ffffff">
                                    <ItemTemplate>
                                        <img align="middle" src='/images/lock_<%# Eval("锁定") %>.gif' />
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="36px" />
                                </asp:TemplateField>
                                
                               <asp:TemplateField HeaderText="日期" SortExpression="日期">
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("日期","{0:D}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="160px" />
                                </asp:TemplateField>   
                                
                                <asp:TemplateField HeaderText="分厂" SortExpression="分厂ID">
                                    <ItemTemplate>
                                        <asp:Label ID="Label1" runat="server" Text='<%# Bind("分厂ID") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="100px" />
                                </asp:TemplateField>
                                
                                  
                                
                            </Columns>
                            <SelectedRowStyle CssClass="grid-row-selected" />
                          </asp:GridView>
		            </td>
	            </tr>
	            <tr>
		            <td>   
		                <table width="100%">
		                    <tr>
		                        <td class="pagebar">
                                    <asp:Button ID="Button_Pager_First" runat="server" Text="" ToolTip="首页" 
                                        CssClass="pageturn-first-b" onclick="Pager_Click" CommandName="--" />
                                    <asp:Button ID="Button_Pager_Prev" runat="server" Text="" ToolTip="上一页" 
                                        CssClass="pageturn-prev-b" onclick="Pager_Click" CommandName="-" />
                                    <input type="button" class="page-split" />第<asp:TextBox ID="TextBox_Pager" runat="server" CssClass="pageturn" 
                                        ontextchanged="Pager_Click"></asp:TextBox>页<input type="button" class="page-split" /><asp:Label ID="Label_Pages" runat="server"></asp:Label><input type="button" class="page-split" />
                                    
                                    <asp:Button ID="Button_Pager_Next" runat="server" Text="" ToolTip="下一页" 
                                        CssClass="pageturn-next-b" onclick="Pager_Click" CommandName="+" />
                                    <asp:Button ID="Button_Pager_Last" runat="server" Text="" ToolTip="末页" 
                                        CssClass="pageturn-last-b" onclick="Pager_Click" CommandName="++" />
                                </td>
                                <td class="pagebar" align="right">
                                    <asp:Label ID="Label_Total" runat="server"></asp:Label>
                                </td>
                            </tr>
                       </table>

		            </td>
	            </tr>
            </table>
            

        </div>
    </div>





</form>

</body>
</html>
